﻿<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <variable name="relaxed"
              value="${longdate} | ${level:uppercase=true:padding=-5} | ${callsite} | ${message}"
    />

    <targets>

        <target xsi:type="EventLog"
                name="eventlog"
                layout="${level:uppercase=true}: ${message}"
                machineName="."
                source="MagazineCensus"
                log="Application"
                eventId="1"
                maxKilobytes="4096"
                maxMessageLength="1024"
        />

        <target name="logconsole" xsi:type="ColoredConsole"
                layout="${relaxed}"
        />

        <target name="debuglog" xsi:type="File"
                layout="${relaxed}"
                fileName="LogFile.txt"
        />

        <target name="productionlog" xsi:type="File"
                layout="${relaxed}"
                fileName="${specialfolder:folder=CommonApplicationData}/Ars Magna/AvaloniaAppTests/LogFile.txt"
        />

    </targets>

    <rules>
        <logger name="*" minlevel="Debug" writeTo="debuglog" />
    </rules>

</nlog>
